/* 视频页面样式 */
.video-page {
  width: 100%;
  height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 头部导航 */
.video-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-tabs {
  display: flex;
  gap: 30px;
}

.tab-item {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  position: relative;
  transition: all 0.3s ease;
  text-align: center;
}

.tab-item:hover {
  color: rgba(255, 255, 255, 0.8);
}

.tab-item.active {
  color: #ffffff;
  font-weight: 600;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #1890ff;
  border-radius: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 视频容器 */
.video-container {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  margin-top: 60px;
}

.video-container::-webkit-scrollbar {
  display: none;
}

/* 视频项 */
.video-item {
  width: 100%;
  height: calc(100vh - 60px);
  position: relative;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.video-item.active {
  /* 当前播放的视频样式 */
}

/* 视频播放器 */
.video-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-item:hover .video-overlay {
  opacity: 1;
}

.play-pause-btn {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-pause-btn:hover {
  transform: scale(1.1);
}

/* 视频信息 */
.video-info {
  position: absolute;
  bottom: 100px;
  left: 20px;
  right: 80px;
  color: #ffffff;
  z-index: 10;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-name {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.follow-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.follow-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.follow-btn.followed {
  background: #1890ff;
  border-color: #1890ff;
}

/* 右侧操作栏 */
.video-actions {
  position: absolute;
  right: 20px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.action-btn {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.action-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}

.action-btn.liked {
  background: rgba(255, 77, 79, 0.3);
}

.action-count {
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 60px);
  color: #ffffff;
  font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .video-header {
    height: 50px;
    padding: 0 15px;
  }

  .header-tabs {
    gap: 20px;
  }

  .tab-item {
    font-size: 14px;
  }

  .video-container {
    margin-top: 50px;
  }

  .video-item {
    height: calc(100vh - 50px);
  }

  .video-info {
    bottom: 80px;
    left: 15px;
    right: 70px;
  }

  .video-title {
    font-size: 14px;
  }

  .video-actions {
    right: 15px;
    bottom: 80px;
    gap: 15px;
  }

  .action-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .play-pause-btn {
    font-size: 50px;
  }
}

@media (max-width: 360px) {
  .header-tabs {
    gap: 15px;
  }

  .tab-item {
    font-size: 13px;
  }

  .video-info {
    bottom: 70px;
    left: 12px;
    right: 65px;
  }

  .video-actions {
    right: 12px;
    bottom: 70px;
  }

  .action-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* 滚动优化 */
.video-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-item {
  animation: fadeIn 0.3s ease-out;
}

/* 触摸优化 */
.video-item {
  touch-action: pan-y;
}

/* 全屏支持 */
.video-element:fullscreen {
  object-fit: contain;
}

.video-element:-webkit-full-screen {
  object-fit: contain;
}

.video-element:-moz-full-screen {
  object-fit: contain;
}